#!/bin/bash

REPO_URL="https://gitee.com/skywxs/rosbag_record.git"
FILE_NAME="record_data.sh"
DIR_NAME="./rosbag_record"

if [ -d "$DIR_NAME" ]; then
    cd "$DIR_NAME"
    git pull
else
    git clone "$REPO_URL"
    cd "$DIR_NAME"
fi

chmod +x "$FILE_NAME"
./"$FILE_NAME"